<?php
/**
 * Description:
 * Author: JennyWang
 * Date: 2018/9/1
 * Time: 15:36
 * Created by PhpStorm.
 */

namespace App\Http\Requests\WebPage\Seo;


use App\Http\Requests\Request;

/**
 * Class ProductIndexRequest
 *
 * @property int|null pid - product_category_id
 * @property int|null detail_id - product_id
 * @property int|null page - 页数
 * @property string|null keyword - search prod keyword
 *
 * @package App\Http\Requests\WebPage\Seo
 */
class ProductIndexRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }
    
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'pid'       => 'sometimes|int',
            'detail_id' => 'sometimes|int',
            'page'      => 'sometimes|int',
            'keyword'   => 'sometimes|string',
        ];
    }
}